<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j"
	template="/WEB-INF/templates/template.xhtml">
	<ui:define name="title">#{messages.personasTitulo}</ui:define>
	<ui:define name="content">
		<h:form id="form">
			<h:outputStylesheet>
				.rf-dt-personas{
					width:100%;
				}
				#butons span {
					   float: none;
				}
			</h:outputStylesheet>
			<rich:dataTable keepSaved="true" id="richTable" var="record" 
				value="#{personaFisicaList}" rows="20" styleClass="rf-dt-personas">
				
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages.personaPrimerNombre}"/>						
					</f:facet>
					<h:outputText value="#{record.primerNombre}"/>			
				</rich:column>
				
				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages.personaApellido1}"/>						
					</f:facet>
					<h:outputText value="#{record.apellido1}"/>			
				</rich:column>

				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages.personaApellido2}"/>						
					</f:facet>
					<h:outputText value="#{record.apellido2}"/>			
				</rich:column>

				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages.personaCUIT}"/>						
					</f:facet>
					<h:outputText value="#{record.cuit}" converter="ciupConverter"/>			
				</rich:column>

				<rich:column>
					<f:facet name="header">
						<h:outputText value="#{messages.actiones}"/>						
					</f:facet>

		        	<h:commandLink action="edit.xhtml">
       					<h:graphicImage value="/resources/images/edit.gif" alt="edit"/>
       					<f:setPropertyActionListener value="#{record}" 
       						target="#{editPersonaFisica}" />
       				</h:commandLink>			        

				</rich:column>

            	<f:facet name="footer">
                	<rich:dataScroller id="scroller" />
	            </f:facet>
            </rich:dataTable>
		</h:form>
	</ui:define>	
</ui:composition>
